<?php
namespace Common\Model;

use Think\Model;

/*回收列表*/
class RecycleOrderModel extends Model {
	
	/*
     * 获取手机回收列表
    */
    public function getRecycleOrderlList($pageNo = 1, $pageSize = 15, $where = array(), $order = array(), $field = "*") {
        $rt = $this->field($field)->where($where)->page("$pageNo,$pageSize")->order($order)->select();
        return $rt;
    }
	
    /*
     * 获取回收总数
    */
    public function getRecycleOrderLength($where = array()) {
        $result = $this->where($where)->count();
        return $result;
    }
    
    /*获取单条回收信息*/
    public function getList($sn){
        $userID = D("RecycleOrder")->where("sn = $sn")->getField("userID");
        $userArr = D("User")->where("userID = $userID")->field("nickName,province,city")->find();            
        $RecyleArr = $this->where("sn = $sn")->find();
        $arr = array("Recyle"=>$RecyleArr,"User"=>$userArr);
        return $arr;
    }
    
   

	
}